<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>echarts</title>
    <style>
      .echarts {
        width: 400px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div class="echarts"></div>
    <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.1.2/echarts.min.js"></script>
    <script>
      const myEcharts = echarts.init(document.querySelector('.echarts'))
      myEcharts.setOption({
        title: {
          text: '散点图'
        },
        xAxis: {
          // type: 'value'
        },
        yAxis: {
          // type: 'value'
        },
        series: {
          type: 'scatter',
          data: [
            [20, 10],
            [30, 20],
            [10, 30],
            [20, 30],
            [40, 10],
            [20, 40]
          ]
        }
      })
    </script>
  </body>
</html>
